-
Notifications
You must be signed in to change notification settings - Fork 54
accumulate generated css styles for imported/required css files #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
accumulate generated css styles for imported/required css files #16
Conversation
|
I did a followup on #6 It works for my usage, and given the tests, it seems it works in other cases. WDYT? |
0135ce4 to
79352f5
Compare
| }); | ||
|
|
||
| // wrap or define processCss function that collect generated css | ||
| currentConfig.processCss = pushStylesCreator(currentConfig.processCss); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure that processCss is not transforming css in some way and returns it? Because if so then we need to update pushStylesCreator to reflect those changes before css is passed to extractCssFile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed.
I updated pushStylesCreator to use processCss return value if it is a string.
|
Great PR, thank you! 👍 There is only this one question from me. When we'll be sure that |
79352f5 to
072fffc
Compare
Fixes michalkvasnicak#5 Replaces michalkvasnicak#6 It is helpful to release a library that uses css-modules. To combine all css files in a single file, give its name: ``` { "plugins": [ [ "css-modules-transform", { "extractCss": "./dist/stylesheets/combined.css" } ] ] } ``` To extract all files in a single directory, give an object: ``` { "plugins": [ [ "css-modules-transform", { "extractCss": { dir: "./dist/stylesheets/", relativeRoot: "./src/", filename: "[path]/[name].css" } } ] ] } ```
072fffc to
18118ae
Compare
|
@themouette thank you 👍 |
|
Released as |
|
\o/ |
Fixes #5
Replaces #6
It is helpful to release a library that uses css-modules.
To combine all css files in a single file, give its name:
To extract all files in a single directory, give an object: